home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Atari Compendium
/
The Atari Compendium (Toad Computers) (1994).iso
/
files
/
umich
/
utils
/
gemfsc15.lzh
/
AESSRC14.LZH
/
AESUTRS5.S
< prev
next >
Wrap
Text File
|
1989-09-18
|
2KB
|
67 lines
;*========================================================================
;*
;* AESFAST Public Domain GEM bindings.
;*
;* 09/18/89 v1.3
;* This module is new with this release.
;*========================================================================
;*************************************************************************
;*
;* AESUTRS4.S - Resource-related Utilities 3 of n.
;* Non-standard utility functions.
;*
;*************************************************************************
.include "gemfast.sh"
;-------------------------------------------------------------------------
; rsc_sspec - Set ob_spec value from an object within a tree.
; rsc_spointer - Set pointer to single string within a tree.
;
; This function sets one string pointer/ob_spec from within
; a resource tree. It knows the difference between text and
; non-text objects, and sets the ob_spec or te_ptext value
; as appropriate. It also understands INDIRECT objects.
;
; This routine is named both sspec and spointer only for
; consistancy in naming: since there are gspec and gpointer
; routines, it seems appropriate to have both set routines.
;
; void rsc_sspec(tree, object, obspec_value);
; void rsc_sstrings(tree, object, pointer);
;-------------------------------------------------------------------------
_rsc_sspec::
_rsc_spointer::
.cargs #4,.ptree.l,.object,.newspec.l
move.l .ptree(sp),a0
move.w .object(sp),d2
muls #OBJ_SIZ,d2
lea ob_spec(a0,d2.l),a1 ; Get ob_spec.
btst.b #0,ob_flags(a0,d2.l); Is INDIRECT flag set?
beq.s .notind ; Nope, ob_spec is all set.
move.l (a1),a1 ; Yep, get real ob_spec.
.notind:
move.w ob_type(a0,d2.l),d1 ; Get ob_type.
cmp.b #G_TEXT,d1
beq.s .text
cmp.b #G_BOXTEXT,d1
beq.s .text
cmp.b #G_FTEXT,d1
beq.s .text
cmp.b #G_FBOXTEXT,d1
bne.s .string
.text:
move.l (a1),a1 ; Get te_ptext
.string:
move.l .newspec(sp),(a1) ; Set new ob_spec/te_ptext value.
rts
; end of code